package com.wheel.autoconfigure.dynamicdatasource.datasource;/*
 * <h3>Title:wheel-parent系统</h3>
 * <p>Copyright (c) 2020, wnfbx@163.com. All rights reserved.</p>
 * @author wnfbx@163.com
 */

public class DynamicDataSourceKeyType {

    public enum MasterSlave {

        MASTER("MASTER"), SLAVE("SLAVE");
        private String code;

        MasterSlave(String slave) {
            this.code = slave;
        }

        public String getCode() {
            return code;
        }
    }

    //事务模式
    public enum TRANSACTION {
        EXIST("MASTER"), NONE("SLAVE");

        private String code;

        TRANSACTION(String slave) {
            this.code = slave;
        }

        public String getCode() {
            return code;
        }
    }

    //读写模式
    public enum ReadWrite {
        WRITE("MASTER"), READ("SLAVE");
        private String code;

        ReadWrite(String slave) {
            this.code = slave;
        }

        public String getCode() {
            return code;
        }
    }
}